package com.nimbusung;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class ImageTabActivity extends TabActivity {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.tabmain);

		//Get the tabhost from layout/tabmain.xml (witch is set above, setContentView(R.layout.tabmain); )
		TabHost tabHost = getTabHost();


			//-- Tab for images
			// Intent so we can send the user to another activity
			Intent rssIntent; 
			rssIntent = new Intent().setClass(this, ImageAllPhotoActivity.class); //Load the intent with information
			TabSpec allphotospec = tabHost.newTabSpec("Tab1");
			allphotospec.setIndicator("Alla", getResources().getDrawable(R.drawable.image));
			allphotospec.setContent(rssIntent);
			tabHost.addTab(allphotospec);  //Connect the tab with the intent and other resources as picutres and text. 

			// Tab for Nimbus 
			Intent nimbusIntent;
			nimbusIntent = new Intent().setClass(this, ImageNimbusPhotoActivity.class);
			TabSpec nimbusspec = tabHost.newTabSpec("Tab2");
			nimbusspec.setIndicator("Nimbus", getResources().getDrawable(R.drawable.church_icon));
			nimbusspec.setContent(nimbusIntent);
			tabHost.addTab(nimbusspec); // Adding nimbus tab

			// Tab for Filadelfia 
			Intent filaIntent;
			filaIntent = new Intent().setClass(this, ImageFiladelfiaPhotoActivity.class);
			TabSpec filaspec = tabHost.newTabSpec("Tab3");
			filaspec.setContent(filaIntent);
			filaspec.setIndicator("Filadelfia", getResources().getDrawable(R.drawable.church_icon));
			tabHost.addTab(filaspec); // Adding filadelfia tab  
			
	}

}
